package cn.xw.config;

import com.baomidou.mybatisplus.core.incrementer.IKeyGenerator;
import com.baomidou.mybatisplus.extension.incrementer.OracleKeyGenerator;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.context.annotation.Bean;

/**
 * @Auther: xiaoYang
 * @Date: 2021/4/9 21:14
 * @Description: mybatis-plus配置类
 */
@SpringBootConfiguration
@MapperScan(basePackages = "cn.xw.mapper")  //映射包扫描
public class MybatisPlusConfig {

    @Bean
    public IKeyGenerator keyGenerator() {
        //创建Oracle序列
        return new OracleKeyGenerator();
    }
}
